package com.common.util;

/**
 * 常量类，用于定义常量
 *
 */
public final class ConstantDefine {

	public static final String LIC = "lic";
    public static final String LOG_MODEL = "log";

    private ConstantDefine() {
	}
    public static final String LAST_URL_KEY = "lastUrlKey";
	/**
	 * 广告模块
	 */
	//public static final String ADV_MODEL = "adv";

	public static final String ADV_MODEL;
	static {
    ADV_MODEL=DateUtil.getNowForMat(DateUtil.datePath);
    }

	public static final String FACE_MODEL = "face";

	/**
	 * 系统用户
	 */
	public static final String SYSTEM = "system";
	/**
	 * app_update.status 更新失败
	 */
	public static final String PLAN_UPDATE_FAIL = "0";
	/**
	 * app_update.status 更新成功
	 */
	public static final String PLAN_UPDATE_SUCCESS = "1";

	/**
	 * APP模块名，上传目录下存放app的目录名称
	 */
	public static final String APP_MODULE="app";
	/**
	 * 新闻初始化
	 */
	public static final String NEWS_INIT="/newsInit";
	/**保存数据list的key*/
	public static final String ROWS = "rows";
	
	/**总记录数的key*/
	public static final String TOTAL="total";
	
	/**页码导航的key*/
	public static final String PAGINATION = "pagination";
	
	/**控制器返回的状态*/
	public static final String FLAG="flag";
	
	/**控制器返回的结果集对象*/
	public static final String RESULT_OBJECT="resultObject";
	
	/**控制器返回错误信息的key*/
	public static final String SYS_ERROR_KEY="sysErrorMsg";
	
	
	/**控制器返回字段错误信息的key*/
	public static final String FIELD_ERR_MSG="fieldErrMsg";
	
	/**控制器返回业务校验提示信息的key*/
	public static final String CHECK_ERR_MSG="checkErrMsg";
	
	/**可以重新住入的校验*/
	public static final String CHECK_OK_MSG="checkOkMsg";
	
	/**控制器返回正确提示信息的key*/
	public static final String SUCCESS_MSG="successMsg";
	public static final String SUCCESS="success";
	public static final String FAIL="fail";
	public static final String FAIL_MSG="failMsg";
	/**操作成功*/
	public static final String SUCCESS_INFO="操作成功";
	/**操作失败*/
	public static final String FAIL_INFO="操作失败";
	public static final String NO_PERMISSION="拒绝访问！请先申请权限";
	
	/**系统错误*/
	public static final String SYS_ERR_MSG="系统繁忙，请稍后重试！";
	/**登录提示*/
	public static final String LOGIN_INFO="登录信息过期,请重新登录后再操作";

	public static final String VERSION_REGEX_ERROR="版本号输入错误如：1.0.1";
	
	/**token**/
	public static final String TOKEN="token";
	//填写错误信息与key end
	
	public static final String UTF8="UTF-8";
	
	public static final String RESULT="result";
	
	//填写请求路径常量 start
	/**页面初始化*/
	public static final String INIT_REQ="/init"; 
	/**当前登录人页面初始化*/
	public static final String INIT_PERSONAL="/init/personal"; 
	/**带参数初始化页面*/
	public static final String PARA_INIT_REQ="/init/para"; 
	/**翻页查询请求*/
	public static final String LIST_REQ="/list";
	/**查询请求，用于当前用户*/
	public static final String LIST_PERSONAL="/list/personal"; 
	/**查询一个实体的请求*/
	public static final String SELECT_REQ="/select/{id}"; 
	/**保存或更新请求*/
	public static final String SAVE_REQ="/save";
	public static final String UPDATE_REQ="/update";
	/**保存或更新请求，用于当前用户*/
	public static final String SAVE_PERSONAL="/save/personal"; 
	/**删除请求*/
	public static final String DEL_REQ="/delete"; 
	/**删除请求，用于当前用户*/
	public static final String DEL_PERSONAL="/delete/personal"; 
	/**转发到错误页面*/
	public static final String FORWARD_ERROR_VIEW = "forward:/error.jsp";
	/**重定向到错误页面*/
	public static final String REDIRECT_ERROR_VIEW = "redirect:/error.jsp";
	//以下文件夹名字的常量
	public static final String FILE_HANDFAIL_DIR="fileHandFail";
	public static final String FILE_HANDREPEAT_DIR="fileHandRepeat";
	public static final String FILE_HANDPARSESUCCESS_DIR="ParseSuccess";
	//填写请求路径常量 end
	/**公司id字段常量*/
	public static final String COMPANY_INFO_ID ="companyInfoId ";
	/**验证码字段常量*/
	public static final String CODE="code";
	/**图形验证码字段常量*/
	public static final String IMG_CODE="imgCode";
	/**手机号字段常量*/
	public static final String PHONE_NUM="phoneNum";
	/**发送时间字段常量*/
	public static final String SEND_TIME="sendTime";
	
	/**意见反馈图片上传路径常量*/
	public static final String FEEDBACK_UPLOAD_PICTURE_PATH="feedbackUploadPicture";
	
	/**分享注册者的personCodeSession**/
	public static final String SHARE_PERSONCODE_SESSION = "sharePersonCode";
	
	public static final String DATA_NAME="8";
	
	/** 第三方账号 */
	public static final String THIRD_ACCOUNT_SESSION = "thirdAccount";
	
	/**账号信息session的key */
	public static final String ACCOUNTINFO_SESSION = "sessionAccount";

	public static final String ACCOUNT_ID_SESSION = "accountIdSession";

	/**账号编号的key */
	public static final String ACCOUNT_CODE_SESSION = "accountCodeSession";

	/**用户账号session的key */
	public static final String PERSONCODE_SESSION = "personCodeSession";
	/**姓名session的key */
	public static final String REAL_NAME_SESSION = "realNameSession";
	/**用户名session的key 角色类型 */
	public static final String PERSON_TYPE_SESSION = "personTypeSession";
	/**用户登录的请求 */
	public static final String LOGIN_REQ = "/login";
	/**管理员后台请求 */
	public static final String BACK_MANAGEMENT = "/backManagement";
	/**权限信息session的key */
	public static final String PRIVILEGE_SESSION = "privilegeSession";
	/** 默认头像地址 **/
	public static final String DEFAULT_HEAD = "img/default_F.jpg";
	
	public static final String UPDATE="update";
	public static final String SAVE="save";
	public static final String UPDATE_INIT="updateInit";
	/**mysql utf8的 一个中文长度为3*/
	public static final int MYSQL_CHINESE_LEN=3; 
	/**yyyy-MM-dd*/
	public static final String YMD = "yyyy-MM-dd";
	public static final String YMD_HMS = "yyyy-MM-dd HH:mm:ss";
	/** yyyy-MM*/
	public static final String YM = "yyyy-MM";
	public static final String HMS="HH:mm:ss";
	//常用正则表达式
	/**密码包含大小写字母、数字6-18位正则表达式*/
	public static final String PWD_REG = "^[a-zA-Z0-9]{6,18}$";
	/**判断手机号码的格式的正则表达式*/
	public static final String PHONE_NUM_REG = "^1[0-9]{10}$";
	/** 判断是否为验证码 **/
	public static final String CODE_REG = "^[0-9]{6}$";
	/** 版本号格式*/
	public static final  String VERSION_REG="([0-9])\\.([0-9])\\.([0-9])";

	public static final String PHONE_OR_TELEPHONE_REG = "^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$";
	/**判断邮箱的格式的正则表达式*/
	public static final String EMAIL_REG = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
			
	/**日期(yyyy-MM-dd)正则，满足润年、平年*/
	public static final String YMD_REG="^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$";
	/**判断网址链接格式是否正确*/
	// 请根据实际 appid 和 appkey 进行开发
	public static final int APPID = 1400026039;
	public static final String APPKEY = "5abc0ef5e47e2aff04713db306f80fb1";

	public static final String UndeterminedPosition = "UndeterminedPosition";
	public static final String UndeterminedCompany = "UndeterminedCompany";
	
	/** 是否成功绑定第三方，并初始化内部账号信息 */
	public static final String BIND_THIRDACCOUNT = "bindThirdAccount";

}
